package com.app.partner.control;

import com.app.partner.model.yx;
import com.app.partner.service.yxService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

@RestController
@RequestMapping("/yxController")

public class yxController {
    @Autowired
    yxService yxService;
    @RequestMapping(value="/partyxServlet",method= RequestMethod.POST)
    public List<yx> findAll() {
        List<yx> yslist = new ArrayList<>();
        try {
            yslist = yxService.findAll();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return yslist;
    }
}
